#!/usr/bin/env python
import roslib; roslib.load_manifest('block_build_manager')
import rospy
import sys

from std_msgs.msg import String

# Sends a file name as a string message to loadStateFromYaml() in BuildManager.py to set up a saved block configuration
YAML_LOADER_TOPIC_NAME = "/blocknlp/yaml_loader"

def sendFileName(fn):
  rospy.loginfo("sending input file name: ")
  rospy.loginfo(fn)
  pub.publish(fn)

if __name__ == '__main__':

  pub = rospy.Publisher(YAML_LOADER_TOPIC_NAME,String)
  rospy.init_node('yaml_loader_node')

  sendFileName(sys.argv[1])
